

export const usernameRule = () => {
  return [
      { required: true, message: '用户名不得为空' },
      {
        validator: (rule, value) => {
          if (/[^u4e00-u9fa5w]/g.test(value)) {
            return Promise.reject('不能包含特殊字符')
          }
          return Promise.resolve('')
        }
      }
    ]
}

export const passwordRule = () => {
  return [
    {
      required: true,
      message: '密码不能为空'
    }
  ]
}